﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table width="100%" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;
    border-color: #CCCCCC">
    <tr class="br">
        <td class="style2" height="26">
            <strong>&nbsp;ĐĂNG KÝ NHẬN MAIL</strong>
        </td>
    </tr>
    <tr>
        <td height="35" align="center">
            <table width="95%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="74%" valign="top">
                        <input name="textfield" type="text" id="textfield" style="width: 180px;height:20px"
                            value="Email..." />
                    </td>
                    <td width="26%"  valign="top">
                        <img id="btnRegister" src="../../Themes/images/bt_search.jpg" width="62" height="27" />
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<script type="text/javascript">
    $(document).ready(function () {
        $("#btnRegister").click(function () {

            $.ajax({
                type: "POST",
                cache: false,
                url: "/dangky/",
                data: { email: $("#textfield").val() },
                success: function (data) {
                    if (data.MsgType == 1) {
                        JS_LIB.alert(data.MsgText, 'Thông Báo', false);
                    }
                    else {
                        JS_LIB.alert(data.MsgText, 'Thông Báo', true);
                    }
                }
            });
        });
    });
</script>